from flask import Blueprint
from flask_restx import Api

from app.role_control import AuthServerControl, VerificationCodeControl

authBlueprint = Blueprint("libs", __name__, role_control=AuthServerControl)
auth = Api(authBlueprint)

imageBlueprint = Blueprint(
    "image", __name__, url_prefix="/v1/api", role_control=VerificationCodeControl
)

from . import views  # isort:skip

auth.add_resource(views.Login, "/v1/api/login", role_control=False)
auth.add_resource(views.Logout, "/v1/api/logout", role_control=False)
